<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文件编辑界面</title>
<s:include value="/WEB-INF/pages/common/reference.jsp" />
<bees:editor-import />
</head>
<body>
	<center>
		<div id="container">
			<form action="${fun:url('/backstage/io/file','edit','modify','') }">
				<s:hidden name="directory.path" value="%{#request.directory.path}" />
				<bees:editor style="width:100%;height:auto;"
					rows="[
						{name:'目录名称',height:'30px',editer:{
								type:'text',
								name:'directory.name',
								property:'name',
								placeholder:'请输入目录的名称',
								size:'30',
								validator:{rule:{required:true,maxlength:20},message:{required:'不能为空',maxlength:'长度不能大于20'}}
							}
						},
						{name:'上级目录',height:'30px',editer:{
								type:'select',
								name:'directory.parent.path',
								value:'${param.path }',
								property:'parent.path',
								placeholder:'请请选择上级目录',
								url:'${fun:url('/backstage/io/file','paging','','scope=DIRECTORY')}'
							}
						}
					]"
					domain="${directory }" 
				/>
			</form>
			<hr />
			<form action="${fun:url('/backstage/io/file','edit','modify','') }" enctype="multipart/form-data" method="post">
				<s:hidden name="document.path" value="%{#request.document.path}" />
				<bees:editor style="width:100%;height:auto;"
					rows="[
						{name:'文件名称',height:'30px',editer:{
								type:'text',
								name:'document.name',
								property:'name',
								placeholder:'请输入文件的名称',
								size:'30',
								validator:{rule:{required:true,maxlength:20},message:{required:'不能为空',maxlength:'长度不能大于20'}}
							}
						},
						{name:'上级目录',height:'30px',editer:{
								type:'select',
								name:'document.directory.path',
								value:'${param.path }',
								property:'directory.path',
								placeholder:'请请选择上级目录',
								url:'${fun:url('/backstage/io/file','paging','','scope=DIRECTORY')}'
							}
						},
						{name:'文件',height:'30px',editer:{
								type:'file',
								name:'document.file',
								property:'file',
								placeholder:'请选择文件',
								size:'30'
							}
						}
					]"
					domain="${document }" 
				/>
			</form>
		</div>
	</center>
</body>
</html>